/**
 * 质量管理 审核
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 开发环境调用（刘帝威）本地接口服务
const prefix = process.env.NODE_ENV === 'development'? 'liudiwei' : SERVER.CLAIMFAC

// 如果想使用测试环境接口服务  则使用下方语句
// const prefix = SERVER.CLAIMFAC

// 审核 - 列表
export const reqListAudit = params => axios.post(`${SERVER.CLAIMFAC}/rPQaReport/getListByPage`, params );
// 审核 - 明细
export const reqDetailsAudit = params => axios.get(`${SERVER.CLAIMFAC}/rPQaReport/selectById/${params.reportId}`,  {params} );

// 审核 - 服务站查询
export const reqListDLR = params => axios.post(`${SERVER.CLAIMFAC}/rPQaReport/getAllDealerInfoDetailSP`,  params );
// 审核 - 驳回 通过 拒绝
export const reqSaveAudit = (params) => axios.post(`${SERVER.CLAIMFAC}/rPQaReport/getApprovalStatus`, params)
// 审核 - 导出
export const reqExcelAudit = params => axios.post(`${SERVER.CLAIMFAC}/rPQaReport/getListForExport`,  params ,{responseType: 'blob'});

export const getUserInfo = params => axios.get(`${SERVER.midEndAuthCenter}/emp/getUserNameList`, { params });

export const getDealerInfo = params => axios.get(`${SERVER.CLAIMFAC}/rPQaReport/getDealer`, { params });